package top.mccsdl.Acbot.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import top.mccsdl.Acbot.entity.Keyboard;
import top.mccsdl.Acbot.entity.Markdown;
import top.mccsdl.Acbot.entity.MdKeyValue;
import top.mccsdl.Acbot.entity.Message;

@Service
public class MenuService {

    // @Autowired
    // private MenuDao menuDao;
    public void getMenuMsg(String[] string, Message message) {
        //下面是md模板
        message.setMsgType(2);
        List<MdKeyValue> list = new ArrayList<>();
        list.add(new MdKeyValue("title", new String[]{"标题"}));
        list.add(new MdKeyValue("value1", new String[]{"value1"}));
        list.add(new MdKeyValue("value2", new String[]{"value2"}));
        message.setMarkdown(new Markdown("",
                "xxxxxxx_xxxxx", list
        ));
        //按钮模板
        message.setKeyboard(new Keyboard("xxxxxxx_xxxxx"));

    }
}
